package com.crl.module.loaders
{
	import com.crl.module.loaders.workers.ILoadWorker;

	public interface IQueueWorkerListener
	{
		/**
		 * 
		 * @param loader
		 * @param data
		 * @param index
		 * 
		 */		
		function onItemComplete(loader:IQueueWorker,data:*,index:int):void;
		
		
		/**
		 * 提供参数以知道下载进度; 
		 * @param loader
		 * @param bytesLoaded
		 * @param bytesTotal
		 * @param index
		 * @param total
		 * 
		 */		
		function onQueueProgress(loader:IQueueWorker,bytesLoaded:int,bytesTotal:int,index:int,total:int):void;
		
		/**
		 * 所有内容加载完毕; 
		 * @param loader
		 * @param datas
		 * 
		 */		
		function onQueueComplete(loader:IQueueWorker,datas:Array):void;
		
		function onQueueSecurityError(loader:IQueueWorker,message:String):void;
		
		function onQueueIOError(loader:IQueueWorker,index:int,message:String):void;
	}
}